Home
Java
JSTL
Struts
Spring
Hibernate
Webservice
Eclipse
API
Guest Post
Menu
Explorer
CtCI-6th-Edition-master
Java
Big O
Example_16
Example.java
QVI_11_Print_Sorted_Strings
Question.java
Ch 01. Arrays and Strings
Q1_01_Is_Unique
QuestionA.java
QuestionB.java
Tester.java
Q1_02_Check_Permutation
QuestionA.java
QuestionB.java
Q1_03_URLify
Question.java
Q1_04_Palindrome_Permutation
Common.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q1_05_One_Away
QuestionA.java
QuestionB.java
Tester.java
Q1_06_String_Compression
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q1_07_Rotate_Matrix
Question.java
Q1_08_Zero_Matrix
QuestionA.java
QuestionB.java
Tester.java
Q1_09_String_Rotation
Question.java
Ch 02. Linked Lists
Q2_01_Remove_Dups
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q2_02_Return_Kth_To_Last
QuestionA.java
QuestionC.java
QuestionD.java
Tester.java
Q2_03_Delete_Middle_Node
Question.java
Q2_04_Partition
Question.java
QuestionB.java
QuestionC.java
Tester.java
Q2_05_Sum_Lists
PartialSum.java
QuestionA.java
QuestionB.java
Q2_06_Palindrome
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q2_07_Intersection
Question.java
Q2_08_Loop_Detection
Question.java
Ch 03. Stacks and Queues
Introduction
MyQueue.java
MyStack.java
QueueTester.java
StackTester.java
Q3_01_Three_in_One
FixedMultiStack.java
FullStackException.java
MultiStack.java
QuestionA.java
QuestionB.java
Q3_02_Stack_Min
NodeWithMin.java
Question.java
StackWithMin.java
StackWithMin2.java
Q3_03_Stack_of_Plates
Node.java
Question.java
SetOfStacks.java
Stack.java
Q3_04_Queue_via_Stacks
MyQueue.java
Question.java
Q3_05_Sort_Stack
Question.java
Q3_06_Animal_Shelter
Animal.java
AnimalQueue.java
Cat.java
Dog.java
Question.java
Ch 04. Trees and Graphs
Introduction
Traversals.java
Q4_01_Route_Between_Nodes
Graph.java
Node.java
Question.java
Q4_02_Minimal_Tree
Question.java
Q4_03_List_of_Depths
QuestionBFS.java
QuestionDFS.java
Q4_04_Check_Balanced
QuestionBrute.java
QuestionImproved.java
Q4_05_Validate_BST
IntWrapper.java
Question.java
QuestionB.java
Q4_06_Successor
Question.java
Q4_07_Build_Order
DFS
Graph.java
Project.java
Question.java
EdgeRemoval
Graph.java
Project.java
Question.java
Q4_08_First_Common_Ancestor
Question.java
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
QuestionE.java
QuestionEBad.java
QuestionF.java
Tester.java
Q4_09_BST_Sequences
Question.java
Q4_10_Check_Subtree
QuestionA.java
QuestionB.java
Q4_11_Random_Node
Question.java
Tree.java
TreeNode.java
Q4_12_Paths_with_Sum
QuestionA.java
QuestionB.java
Tester.java
Ch 05. Bit Manipulation
Q5_01_Insertion
Question.java
Q5_02_Binary_to_String
Question.java
Q5_03_Flip_Bit_to_Win
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q5_04_Next_Number
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q5_06_Conversion
QuestionA.java
QuestionB.java
Tester.java
Q5_07_Pairwise_Swap
Question.java
Q5_08_Draw_Line
Question.java
Sample_Code
RightShifts.java
Sample_Code.java
Ch 06. Math and Logic Puzzles
Introduction
PrimeNumbers.java
SieveOfEratosthenes.java
Q6_05_Egg_Drop
Question.java
Q6_07_The_Apocalypse
Question.java
Q6_10_Test_Strips
Bottle.java
QuestionA.java
QuestionB.java
QuestionC.java
TestStrip.java
Ch 07. Object-Oriented Design
Q7_01_Deck_of_Cards
BlackJackCard.java
BlackJackGameAutomator.java
BlackJackHand.java
Card.java
Deck.java
Hand.java
Question.java
Suit.java
Q7_02_Call_Center
Call.java
CallHandler.java
Caller.java
Director.java
Employee.java
Manager.java
Rank.java
Respondent.java
Test.java
Q7_03_Jukebox
CD.java
CDPlayer.java
JukeBox.java
Playlist.java
Song.java
SongSelector.java
User.java
Q7_04_Parking_Lot
Bus.java
Car.java
Level.java
Motorcycle.java
ParkingLot.java
ParkingSpot.java
Question.java
Vehicle.java
VehicleSize.java
Q7_05_Online_Book_Reader
Book.java
Display.java
Library.java
OnlineReaderSystem.java
User.java
UserManager.java
Q7_06_Jigsaw
Edge.java
Orientation.java
Piece.java
Puzzle.java
Question.java
Shape.java
Q7_07_Chat_Server
AddRequest.java
Conversation.java
GroupChat.java
Message.java
PrivateChat.java
RequestStatus.java
System.java
User.java
UserManager.java
UserStatus.java
UserStatusType.java
Q7_08_Othello
Automator.java
Board.java
Color.java
Direction.java
Game.java
Location.java
Piece.java
Player.java
Question.java
Q7_09_Circular_Array
CircularArray.java
Question.java
Q7_10_Minesweeper
Board.java
Cell.java
Game.java
Question.java
UserPlay.java
UserPlayResult.java
Q7_11_File_System
Directory.java
Entry.java
File.java
Question.java
Q7_12_Hash_Table
Dummy.java
Hasher.java
Question.java
Ch 08. Recursion and Dynamic Programming
Introduction
FibonacciA.java
FibonacciB.java
FibonacciC.java
FibonacciD.java
Q8_01_Triple_Step
QuestionA.java
QuestionB.java
Tester.java
Q8_02_Robot_in_a_Grid
Point.java
QuestionA.java
QuestionB.java
Tester.java
Q8_03_Magic_Index
Question.java
QuestionB.java
Q8_04_Power_Set
QuestionA.java
QuestionB.java
Q8_05_Recursive_Multiply
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q8_06_Towers_of_Hanoi
Question.java
Tower.java
Q8_07_Permutations_Without_Dups
QuestionA.java
QuestionB.java
QuestionC.java
Q8_08_Permutations_With_Dups
Question.java
Q8_09_Parens
QuestionA.java
QuestionB.java
Q8_10_Paint_Fill
Question.java
Q8_11_Coins
Question.java
QuestionB.java
Tester.java
Q8_12_Eight_Queens
Question.java
Q8_13_Stack_of_Boxes
Box.java
BoxComparator.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q8_14_Boolean_Evaluation
Others.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Ch 09. Scalability and Memory Limits
Q9_02_Social_Network
BFSData.java
Machine.java
PathNode.java
Person.java
QuestionA.java
QuestionB.java
Server.java
Tester.java
Q9_05_Cache
Cache.java
Node.java
Question.java
Ch 10. Sorting and Searching
Introduction
BinarySearch.java
MergeSort.java
Quicksort.java
Q10_01_Sorted_Merge
Question.java
Q10_02_Group_Anagrams
AnagramComparator.java
Question.java
QuestionB.java
Q10_03_Search_in_Rotated_Array
Question.java
Q10_04_Sorted_Search_No_Size
Arrayish
Listy.java
Question.java
Q10_05_Sparse_Search
QuestionA.java
QuestionB.java
Q10_07_Missing_Int
QuestionA.java
QuestionB.java
Q10_08_Find_Duplicates
BitSet.java
Question.java
Q10_09_Sorted_Matrix_Search
Coordinate.java
QuestionA.java
QuestionB.java
Q10_10_Rank_from_Stream
IntComparable.java
Question.java
RankNode.java
Q10_11_Peaks_and_Valleys
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Ch 13. Java
Introduction
Ambiguous.java
Circle.java
Introduction.java
IntroductionCollections.java
IntroductionOverriding.java
Shape.java
Square.java
Q13_01_Private_Constructor
Question.java
Q13_05_TreeMap_HashMap_LinkedHashMap
Question.java
Q13_06_Object_Reflection
Question.java
Rectangle.java
Q13_07_Lambda_Expressions
Country.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q13_08_Lambda_Random
QuestionA.java
QuestionB.java
QuestionC.java
Ch 15. Threads and Locks
IntroductionA
ExampleA.java
RunnableThreadExample.java
IntroductionB
ExampleB.java
ThreadExample.java
IntroductionLocks
Intro.java
LockedATM.java
MyClass.java
NoLockATM.java
IntroductionSynchronization
Intro.java
MyClass.java
MyObject.java
IntroductionSynchronizedBlocks
Intro.java
MyClass.java
MyObject.java
IntroductionWaitNotify
Intro.java
MyClass.java
MyObject.java
Q15_03_Dining_Philosophers
QuestionA
Chopstick.java
Philosopher.java
Question.java
QuestionB
Chopstick.java
Philosopher.java
Question.java
Q15_04_Deadlock_Free_Class
LockFactory.java
LockNode.java
Question.java
Q15_05_Call_In_Order
Foo.java
FooBad.java
MyThread.java
Question.java
Q15_06_Synchronized_Methods
Foo.java
MyThread.java
Question.java
Q15_07_FizzBuzz
FBThread.java
FizzBuzzThread.java
NumberThread.java
QuestionA.java
QuestionB.java
QuestionC.java
Ch 16. Moderate
Q16_01_Number_Swapper
Question.java
Q16_02_Word_Frequencies
QuestionA.java
QuestionB.java
Q16_03_Intersection
Line.java
Point.java
Question.java
Q16_04_Tic_Tac_Win
Piece.java
Position.java
PositionIterator.java
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
QuestionE.java
QuestionF.java
QuestionG.java
QuestionH.java
Tester.java
Q16_05_Factorial_Zeros
QuestionA.java
QuestionB.java
Q16_06_Smallest_Difference
QuestionA.java
QuestionB.java
Tester.java
Q16_07_Number_Max
Question.java
Q16_08_English_Int
Question.java
Q16_09_Operations
Question.java
Q16_10_Living_People
Person.java
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q16_11_Diving_Board
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q16_12_XML_Encoding
Attribute.java
Element.java
QuestionOO.java
QuestionString.java
Q16_13_Bisect_Squares
Line.java
Point.java
Question.java
Square.java
Q16_14_Best_Line
GraphPoint.java
Line.java
Question.java
Q16_15_Master_Mind
Question.java
Q16_16_Sub_Sort
Question.java
Q16_17_Contiguous_Sequence
Question.java
Q16_18_Pattern_Matcher
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q16_19_Pond_Sizes
QuestionA.java
QuestionB.java
Q16_20_T9
QuestionA.java
QuestionB.java
QuestionC.java
Q16_21_Sum_Swap
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q16_22_Langtons_Ant
Ant.java
Board.java
Grid.java
Orientation.java
Position.java
Question.java
Q16_23_Rand7_From_Rand5
Question.java
QuestionB.java
Q16_24_Pairs_With_Sum
Pair.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q16_25_LRU_Cache
Cache.java
Question.java
Q16_26_Calculator
Operator.java
QuestionA.java
QuestionB.java
Term.java
Ch 17. Hard
Q17_01_Add_Without_Plus
QuestionA.java
QuestionB.java
Tester.java
Q17_02_Shuffle
Question.java
Q17_03_Random_Set
Question.java
QuestionAlternate.java
Q17_04_Missing_Number
BitInteger.java
Question.java
Q17_05_Letters_and_Numbers
QuestionA.java
QuestionB.java
Tester.java
Q17_06_Count_of_2s
Question.java
QuestionBrute.java
Q17_07_Baby_Names
Graph.java
GraphNode.java
NameSet.java
QuestionA.java
QuestionB.java
Q17_08_Circus_Tower
HtWt.java
QuestionA.java
QuestionB.java
QuestionOld.java
Tester.java
Q17_09_Kth_Multiple
QuestionA.java
QuestionB.java
QuestionC.java
Q17_10_Majority_Element
QuestionA.java
QuestionB.java
Q17_11_Word_Distance
LocationPair.java
QuestionA.java
QuestionB.java
Tester.java
Q17_12_BiNode
BiNode.java
QuestionA.java
QuestionB.java
QuestionC.java
Q17_13_ReSpace
ParseResult.java
QuestionA.java
QuestionB.java
Q17_14_Smallest_K
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q17_15_Longest_Word
LengthComparator.java
Question.java
Q17_16_The_Masseuse
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Tester.java
Q17_17_Multi_Search
QuestionA.java
QuestionB.java
QuestionC.java
Trie.java
TrieNode.java
Q17_18_Shortest_Supersequence
HeapNode.java
QuestionA.java
QuestionB.java
QuestionC.java
QuestionD.java
Range.java
Tester.java
Q17_19_Missing_Two
QuestionA.java
QuestionB.java
QuestionC.java
Q17_20_Continuous_Median
MaxHeapComparator.java
MinHeapComparator.java
Question.java
Q17_21_Volume_of_Histogram
HistogramData.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q17_22_Word_Transformer
BFSData.java
PathNode.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
Q17_23_Max_Black_Square
Question.java
QuestionEff.java
SquareCell.java
Subsquare.java
Q17_24_Max_Submatrix
QuestionA.java
QuestionB.java
QuestionC.java
Range.java
SubMatrix.java
Tester.java
Q17_25_Word_Rectangle
Question.java
Rectangle.java
WordGroup.java
Q17_26_Sparse_Similarity
DocPair.java
Document.java
QuestionA.java
QuestionB.java
QuestionC.java
Tester.java
CtCILibrary
CtCILibrary
AssortedMethods.java
BTreePrinter.java
BitVector.java
HashMapList.java
LinkedListNode.java
TreeNode.java
Trie.java
TrieNode.java
Introduction
Big_O
Ex_01.java
Ex_02.java
Ex_03.java
Ex_04.java
Ex_05.java
Ex_06.java
Ex_07.java
Ex_08.java
Ex_09.java
Ex_10.java
Ex_11.java
Ex_14.java
Ex_15.java
Ex_16.java
Ex_17.java
Ex_18.java
Ex_19.java
Ex_20.java
Q_01.java
Q_02.java
Q_03.java
Q_04.java
Q_05.java
Q_06.java
Q_09.java
Q_10.java
Q_11.java
Q_12.java
CompareBinaryToHex
CompareBinaryToHex.java
SwapMinMax
SwapMinMax.java